New course! Every coder should learn Generative AI!
Try a free lessonQ&A Discussions
Understand the {0}
1 Vote
1 AnswerWhat is {0}
0 Votes
1 AnswerWhat's the meaning of {0} ?
23 Votes
14 Answerswhat is {0} this.
1 Vote
2 AnswersWhat does {0} {1} means?
0 Votes
1 AnswerC#: what is {0} or {1}?
1 Vote
2 AnswersWhat is the use of {0}
0 Votes
1 AnswerWhy we use x = {0}
0 Votes
2 AnswersI dont unserstand the output if this code :
# string formatting
nums = [4, 5, 6]
msg = "Numbers: {0} {0} {2}". format(nums[0], nums[1], nums[2])
print(msg)
4 4 6
but when I do :
# string formatting
nums = [4, 5, 6]
msg = "Numbers: {0} {0} {2}". format(nums[1], nums[1], nums[2])
print(msg)
it gives me
5 5 6
is there a priority in the Reading ?
0 Votes
5 Answersusing System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SoloLearn
{
class Program
{
static void Main(string[] args)
{
int age = Convert.ToInt32(Console.ReadLine());
int broAge = Convert.ToInt32(Console .Readline());
Console.WriteLine("You are {0} years old", "your bro is {1}", age, broAge );
}
}
}
-1 Vote
7 AnswersWhat is this "{0}"?
4 Votes
1 AnswerHot today
What next?
0 Votes
Popsicle program
1 Votes
How to learn Web Development?
0 Votes
Why 'null >= 0' is TRUE?
3 Votes
R programming
2 Votes